﻿using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Color
{
    public class ColorModel : XmlSerializable
    {
        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public XmlList<IColorModelElement> ColorElements { get; set; }

        public ColorModel()
        {
            ColorElements = new XmlList<IColorModelElement>();
        }
    }

    #region ColorElements

    [XmlRoot("tint", Namespace = Constants.Main)]
    public class Tint : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Tint() { }
    }

    [XmlRoot("shade", Namespace = Constants.Main)]
    public class Shade : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Shade() { }
    }

    [XmlRoot("comp", Namespace = Constants.Main)]
    public class Complement : XmlSerializable, IColorModelElement
    {
        public Complement() { }
    }

    [XmlRoot("gray", Namespace = Constants.Main)]
    public class Gray : XmlSerializable, IColorModelElement
    {
        public Gray() { }
    }

    [XmlRoot("inv", Namespace = Constants.Main)]
    public class Inverse : XmlSerializable, IColorModelElement
    {
        public Inverse() { }
    }

    [XmlRoot("alpha", Namespace = Constants.Main)]
    public class Alpha : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Alpha() { }
    }

    [XmlRoot("alphaOff", Namespace = Constants.Main)]
    public class AlphaOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public AlphaOffset() { }
    }

    [XmlRoot("alphaMod", Namespace = Constants.Main)]
    public class AlphaModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public AlphaModulation() { }
    }

    [XmlRoot("hue", Namespace = Constants.Main)]
    public class Hue : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Hue() { }
    }

    [XmlRoot("hueOff", Namespace = Constants.Main)]
    public class HueOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public HueOffset() { }
    }

    [XmlRoot("hueMod", Namespace = Constants.Main)]
    public class HueModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public HueModulation() { }
    }

    [XmlRoot("sat", Namespace = Constants.Main)]
    public class Saturation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Saturation() { }
    }

    [XmlRoot("satOff", Namespace = Constants.Main)]
    public class SaturationOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public SaturationOffset() { }
    }

    [XmlRoot("satMod", Namespace = Constants.Main)]
    public class SaturationModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public SaturationModulation() { }
    }

    [XmlRoot("lum", Namespace = Constants.Main)]
    public class Luminance : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Luminance() { }
    }

    [XmlRoot("lumOff", Namespace = Constants.Main)]
    public class LuminanceOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public LuminanceOffset() { }
    }

    [XmlRoot("lumMod", Namespace = Constants.Main)]
    public class LuminanceModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public LuminanceModulation() { }
    }

    [XmlRoot("red", Namespace = Constants.Main)]
    public class Red : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Red() { }
    }

    [XmlRoot("redOff", Namespace = Constants.Main)]
    public class RedOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public RedOffset() { }
    }

    [XmlRoot("redMod", Namespace = Constants.Main)]
    public class RedModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public RedModulation() { }
    }

    [XmlRoot("green", Namespace = Constants.Main)]
    public class Green : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Green() { }
    }

    [XmlRoot("greenOff", Namespace = Constants.Main)]
    public class GreenOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public GreenOffset() { }
    }

    [XmlRoot("greenMod", Namespace = Constants.Main)]
    public class GreenModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public GreenModulation() { }
    }
    [XmlRoot("blue", Namespace = Constants.Main)]
    public class Blue : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public Blue() { }
    }

    [XmlRoot("blueOff", Namespace = Constants.Main)]
    public class BlueOffset : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public BlueOffset() { }
    }

    [XmlRoot("blueMod", Namespace = Constants.Main)]
    public class BlueModulation : XmlSerializable, IColorModelElement
    {
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public int Value { get; set; }

        public BlueModulation() { }
    }

    [XmlRoot("gamma", Namespace = Constants.Main)]
    public class Gamma : XmlSerializable, IColorModelElement
    {
        public Gamma() { }
    }

    [XmlRoot("invGamma", Namespace = Constants.Main)]
    public class InverseGamma : XmlSerializable, IColorModelElement
    {
        public InverseGamma() { }
    }

    #endregion
}
